package com.hao.cdk.common.web;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author: 许自豪
 * @date: 2025-01-17 15:52:59
 * @description: 数据封装对象
 */
@ApiModel("响应体")
@Data
public class WebResponse<T> {
    @ApiModelProperty("状态码")
    private String statusCode;

    @ApiModelProperty("消息")
    private String message;

    @ApiModelProperty("响应数据")
    private T result;

    @ApiModelProperty("版本号")
    private String version;

    public WebResponse() {
    }

    public WebResponse(String message, String apiName, T data) {
        this.message = message;
        this.result = this.result;
    }

    public WebResponse(String message, T data) {
        this.message = message;
        this.result = this.result;
    }

}
